var dataTheme = {
    themes: [
        {title: '黑白主题', theme: 'admin'},
        {title: '黑色主题', theme: 'black'},
        {title: '蓝色主题', theme: 'blue'},
        {title: '藏青主题', theme: 'cyan'},
        {title: '黄色主题', theme: 'yellow'},
        {title: '绿色主题', theme: 'green'},
        {title: '粉红主题', theme: 'pink'},
        {title: '紫白主题', theme: 'purple-white'},
        {title: '紫色主题', theme: 'purple'},
        {title: '白色主题', theme: 'white'},
        {title: '红白主题', theme: 'red-white'},
        {title: '红色主题', theme: 'red'}
    ]
}
layui.use(["layer", "globalConfig", "sysTheme", "form"], function () {
    let $ = layui.jquery;
    let globalConfig = layui.globalConfig;
    let sysTheme = layui.sysTheme;
    let form = layui.form;

	$('#viewTheme').vm({
		themes: dataTheme.themes
	})
    // 切换主题
    $('.btnTheme').click(function () {
        $('.btnTheme').removeClass('active');
        $(this).addClass('active');
        sysTheme.changeTheme($(this).attr('theme'));
    });
});
